1. Field of the Invention
The present invention relates to a method of effectively sharing a database among processors and a database system therefor, and more particularly, to a database sharing method which is capable of reducing overhead when the database is accessed and a database system therefor.
2. Description of the Related Art
With increasing scale and diversification of a computer system, a multiprocessor system has been employed as such a computer system for purpose of distributing functions, loads and risks. A database system used in the computer system is disclosed, for example, in JP-A-62-204360.
A database system 100 shown in the above-cited document, as shown in FIG. 1A, generally includes processors 112 and 122, which are connected to each other through a channel-to-channel adapter (CTCA) 120, share a database unit 110 and are respectively connected to log units 114 and 124. The processors 112 and 122 internally have exclusive control managers 112-1 and 122-1 for performing exclusive control when the database unit 110 is accessed. The unit 110 is unitarily managed by the processor 112 and the processor 122 accesses the unit 110 while exchanging exclusive control information with the processor 112.
Next, access processing to the unit 110 by the processor 122 will be explained with reference to FIG. 1B, taking processing for searching the unit 100 for data as an example. When access to the unit 110 is needed based on a user program executed by the processor 122, the manager 122-1 first transmits an exclusive control start request to the processor 112 through the CTCA 120 at step 132. The manager 112-1, responsive to the start request, prohibits the processor 112 and other processors from accessing the unit 110 and transmits an access permission to the processor 122. Then, the processor 122, responsive to the access permission, searches the unit 110 for data by accessing the unit 110, at step 134. Subsequently at step 136, a log in the log unit 124 is updated. Next, at step 138, an exclusive control end request is transmitted from the processor 122 to the processor 112 through the CTCA 120. The manager 112-1, responsive to the end request, enables the processor 112 to access the unit 110 based on the user program executed in the processor 112. The above processing is similarly performed for data update processing for the unit 110.
The conventional database system, as mentioned above, implies the following problems relative to a system performance and a system use.
First, the exclusive control is needed even when a processor performs a mere data search operation for a database unit. For this reason, the processor needs to communicate with another processor managing the database unit for the exclusive control, whereby overhead occurring in data search processing is increased compared with a case where a database unit is not shared among a plurality of processors.
Second, in a database system in which data update processing for a database unit is performed by a plurality of processors, since a log of the update processing is stored in a log unit connected to a processor which performs the update processing, it is necessary to merge all the logs stored in a plurality of log units, when the database unit is recovered from an obstacle, or when the database unit stopped for maintenance is connected again to the system. Therefore, complex processing and a long time for recovering the database unit are required.